<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>User List</title>

</head>



<body>
<script type="text/javascript">
    $(function(){
        console.info('============b');
        $('#userList').datagrid({
            height: 340,
            url: '${pageContext.request.contextPath}/user/list.do',
            method: 'POST',
            striped: true,
            fitColumns: true,
            singleSelect: false,
            rownumbers: true,
            pagination: true,
            nowrap: false,
            pageSize: 10,
            showFooter: true,
            columns: [[
                { field: 'ck', checkbox: true },
                { field: 'name', title: '名字', width: 180, align: 'left' },
                { field: 'age', title: '年龄', width: 150, align: 'left' }
            ]],
            onBeforeLoad: function (param) {
            },
            onLoadSuccess: function (data) {

            },
            onLoadError: function () {

            },
            onClickCell: function (rowIndex, field, value) {

            }
        });
    });

</script>
     <table id="userList"></table>
</body>
</html>